package cn.nai.DemoRan.demo05;
public class Undergraduate extends Student{
    private String degree;
    public Undergraduate() { }
    public Undergraduate(String name, int age, String degree) { super(name, age);this.degree = degree; }
    public String getDegree() { return degree; }
    public void setDegree(String degree) { this.degree = degree; }
    @Override
    public void show() {
        System.out.println("姓名:" + super.getName() + ",年龄:" + super.getAge() + ",学位:" + this.degree);
    }
}
